home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1 Issue 2
/
PDCD-1 - Issue 02.iso
/
_demos
/
demos
/
3ddemo
/
Info
next >
Wrap
Text File
|
1994-10-16
|
4KB
|
89 lines
This is just a short Demo of 3D Animated Graphics.⌐ Bill McKeague.151094
Ensure CapsLocks are Off.
My thanks go out to Kevin Swinton of Archimedes World Magazine for his help
in hidden line removal and polygonal resolution which I was having a few
problems with.He had a few different angles (no pun intended) to approach
these from,which helped me sort out the problems I had.
Anyway,on to the Demo.
2 versions are supplied.The main program,and one without the backdrop,hence
the name NoBDrop.The first uses about 200k due to the sprite I used for
wraparound continuous scrolling and the other 18k.Adding a background was
just an afterthought but I think it looks better,and the extra procedures
didn't take very long.
As it is only a demo,there wasn't a lot you can do with it,except watch,but
I decided to make it a little bit interactive.The keys used are as obvious
as I could make them.ie. s for Stop,g for Go etc.
Key Action
a accellerates the objects rotation
d decellerates the objects rotation
c colour reset to initial values
x rotates the object around the x-axis
y rotates the object around the y-axis
z rotates the object around the z-axis
s stops the object rotating (stop)
g resumes rotation (go)
r resets the initial values,etc (See notes)
' recedes the object(into the distance)
/ brings the object closer
1 changes the Red colour value
2 changes the Green colour value
3 changes the Blue colour value
Cursor Keys moves the object in the relative direction (See notes)
Space selects the next object
Escape exits the program
Notes
In the ver NoBDrop the cursor keys L+R move the object,but in the SpPlot
version they move the backdrop giving the impression of L+R movement.
Pressing r will reset the initial values as at the start,helpful if you lose
the object off the screen,etc.
Pressind d will decrease the rate of rotation of the object until it
eventually stops.Another press on d will give it a negative rotation,ie.it
will rotate backwards.Therefore,to decrease a negative rate-of-rotation you
will have to press a.If in doubt press r to reset.
The auto-repeat is left on,which means that if you hold a key down too
long,the program will continue until the key buffer is empty,and there will
be a delay.3 reasons for this,-
1 I did not want to reconfigure anybody's computer.
2 Escape bypassed the auto repeat reset which was annoying.
3 Continuous movement of the object,L,R,U,D,etc required a lot of key
presses.I thought it better with the-auto repeat on.
Pressing ' brings the object closer until it fills the screen.I stopped it
at this point because any further it gave a negative 3D effect,ie,it showed
the hidden sides of the object in front of the viewed side.
I could have reconfigured the algorithm for hidden line removal when the
variable went negative but I figured if it went behind you (relatively
speaking),you wouldn't see it anyway.
You may also notice,if you read the program,that a lot of the procedures
repeat themselves.This was deliberate.
The main reason for this was that I wanted each object to be in the same
position that you left it in when you returned to it and not assign global
variables that would affect all of the objects at the same time.This I
thought would have been boring,as the only change would have been the shape
of the object.Apart from that,I couldn't be bothered setting up arrays for
the different variables.
The way I chose to do it,you can have each object with different
characteristics,except the colour which is global,and I thought this was
better.Experiment and see!.
As usual,any hints,tips,criticisms etc to
Bill McKeague
14 The Centre
Evenwood
Bishop Auckland
Co Durham
DL14 9QF
Have fun.